package com.app.piemoment.service;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;

import com.app.piemoment.image.ImageCacheManager;
import com.app.piemoment.log.PMLog;

public class ImageCacheClearService extends Service {
	private static final String TAG="ImageCacheClearService";
	
	@Override
	public int onStartCommand(Intent intent, int flags, int startId) {
		PMLog.d(TAG, "onStartCommand----");
		new Thread(new Runnable() {
			@Override
			public void run() {
				ImageCacheManager.clearOverdueCache();
				stopSelf();
			}
		}).start();
		return super.onStartCommand(intent, flags, startId);
	}

	@Override
	public IBinder onBind(Intent intent) {
		return null;
	}

	

}
